 #coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String, Integer


class EquipVenderProRepBypro(Base):
    # 厂家问题统计表按问题分组
    __tablename__ = 'v_equipvenderpro'
    bureauid = Column(String(2), primary_key=True, comment='供电局编号')
    bureauname = Column(String(50), nullable=True, comment='供电局名称')
    classifyid= Column(String(2), primary_key=True, comment='设备类型id')
    classifyname = Column(String(50), nullable=True, comment='设备类型名称')
    pro_classifyid = Column(String(2), primary_key=True, comment='问题类型编码')
    pro_classifyname = Column(String(50), nullable=True, comment='问题类型名称')
    problem_number = Column(Integer, nullable=True, comment='问题数量')


class EquipVenderProRepByproSchema(Schema):
    bureauid = fields.String()
    bureauname = fields.String()
    classifyid= fields.String()
    classifyname = fields.String()
    pro_classifyid = fields.String()
    pro_classifyname = fields.String()
    problem_number = fields.Integer()


equipVenderProRepByproSchema = EquipVenderProRepByproSchema()
